package isjinhao.jlox.grammar.code.represention;

import isjinhao.jlox.grammar.statement.represention.Statement;
import isjinhao.jlox.grammar.statement.visitor.StatementVisitor;
import lombok.Getter;

import java.util.List;

/**
 * @Author ISJINHAO
 * @Date 2021/2/22 18:43
 */
@Getter
public class Block extends Statement {

    public Block(List<Statement> statements) {
        this.statements = statements;
    }

    @Override
    public <R> R accept(StatementVisitor<R> statementVisitor) {
        return statementVisitor.visitBlockStmt(this);
    }

    private final List<Statement> statements;
}